import { Controller } from "../../mvc/core/Controller";
import { IView } from "../../mvc/interfaces/IView";
import { WareHouseBuyItemModule } from "../../../modules/WareHouseBuyItemModule";
import { Dispatcher } from "../../mvc/core/Dispatcher";
import { EventName } from "../mvc/EventName";
import { DataEvent } from "../events/DataEvent";
import { IWareHouseBuyItemModule } from "../../../modules/interfaces/IWareHouseBuyItemModule";
//class PackBuyItemController
    
    export  class PackBuyItemController extends Controller
    {
       

        protected /* override */ initView(): IView
        {
            if (!this._packBuyItemModule) 
            {
                this._packBuyItemModule = new WareHouseBuyItemModule();
            }
            return this._packBuyItemModule;
        }

        protected /* override */ initServer(): void
        {
            Dispatcher.addEventListener(EventName.PackFastBuyPackage, this.onPackFastBuyPackage);
            return;
        }

        /* internal  */onPackFastBuyPackage(arg1: DataEvent): void
        {
            view.show();
            return;
        }

        private /* var */_packBuyItemModule: IWareHouseBuyItemModule;
    }
